package 经此一役小红所向无敌;

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        long a = in.nextLong();
        long h = in.nextLong();
        long b = in.nextLong();
        long k = in.nextLong();
        long res = 0;
        while (h > 0 && k > 0) {
            res += a + b;
            h -= b;
            k -= a;
        }
        if (h > 0) {
            res += 10 * a;
        }
        if (k > 0) {
            res += 10 * b;
        }
        System.out.println(res);
    }
}